]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix compiler warnings
authorOwen W. Taylor <otaylor@fishsoup.net>
Thu, 6 Aug 2009 20:39:15 +0000 (16:39 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Thu, 6 Aug 2009 20:46:55 +0000 (16:46 -0400)
src/shell-global.c src/shell-process.c: Remove dead code
src/shell-texture-cache.c src/shell-status-menu.c: Remove
  <foo>_new() functions that weren't in the header file and
  not used anyways:
src/shell-texture-cache.[ch]: Fix a prototype that used ()
  when (void) was intended.

http://bugzilla.gnome.org/show_bug.cgi?id=590998

src/shell-global.c
src/shell-overflow-list.c
src/shell-process.c
src/shell-stack.c
src/shell-status-menu.c
src/shell-texture-cache.c
src/shell-texture-cache.h

index 299208887435829c65f5549eee4eb07abb0d7d5c..648d1c182806cf62c6f596e1ed003c153c94fe4b 100644 (file)
@@ -271,49 +271,6 @@ shell_global_class_init (ShellGlobalClass *klass)
                                                         G_PARAM_READABLE));
 }
 
-/**
- * search_path_init:
- *
- * search_path_init and get_applications_search_path below were copied from glib/gio/gdesktopappinfo.c
- * copyright Red Hat, Inc., written by Alex Larsson, licensed under the LGPL
- *
- * Return value: location of an array with user and system application directories.
- */ 
-static gpointer
-search_path_init (gpointer data)
-{      
-    char **args = NULL;
-    const char * const *data_dirs;
-    const char *user_data_dir;
-    int i, length, j;
-        
-    data_dirs = g_get_system_data_dirs ();
-    length = g_strv_length ((char **)data_dirs);
-       
-    args = g_new (char *, length + 2);
-       
-    j = 0;
-    user_data_dir = g_get_user_data_dir ();
-    args[j++] = g_build_filename (user_data_dir, "applications", NULL);
-    for (i = 0; i < length; i++)
-      args[j++] = g_build_filename (data_dirs[i],
-                                   "applications", NULL);
-    args[j++] = NULL;
-               
-    return args;
-}
-/**
- * get_applications_search_path:
- *
- * Return value: location of an array with user and system application directories.
- */
-static const char * const *
-get_applications_search_path (void)
-{
-    static GOnce once_init = G_ONCE_INIT;
-    return g_once (&once_init, search_path_init, NULL);
-} 
-
 /**
  * shell_clutter_texture_set_from_pixbuf: 
  * texture: #ClutterTexture to be modified
index 59511803af7b8ccb9a3a0b450b99761f9673b795..2e28b007f4bbc7dfba52e8593e432bac45d7050a 100644 (file)
@@ -181,7 +181,7 @@ shell_overflow_list_allocate (ClutterActor           *actor,
   g_list_free (children);
 }
 
-void
+static void
 shell_overflow_list_paint (ClutterActor *actor)
 {
   ShellOverflowList *self = SHELL_OVERFLOW_LIST (actor);
@@ -403,15 +403,16 @@ shell_overflow_list_get_actor_index (ShellOverflowList *self,
 {
   GList *children, *iter;
   int i;
+  int result;
 
   children = clutter_container_get_children (CLUTTER_CONTAINER (self));
 
   if (children == NULL)
-    return NULL;
+    return -1;
 
   iter = g_list_nth (children, (self->priv->page) * self->priv->items_per_page);
 
-  int result = -1;
+  result = -1;
   for (i = 0; iter; iter = iter->next, i++)
     if (iter->data == actor)
       {
index 76d745af47d294e83a1fd1ecd7849b0c11986075..cec76e9b7d4af29a5f4dcbed48d34f781aab2b2b 100644 (file)
@@ -52,8 +52,6 @@ static void shell_process_init (ShellProcess *self)
 
 static void shell_process_dispose (GObject *object)
 {
-  ShellProcess *self = (ShellProcess*)object;
-
   G_OBJECT_CLASS (shell_process_parent_class)->dispose(object);
 }
 
index dedd9b298ce052cba68f3decf956c3373c29dcf4..e0a5b4bc8d1d9c6ff44f4e05cbd771f317660ac1 100644 (file)
@@ -23,7 +23,6 @@ shell_stack_allocate (ClutterActor           *self,
                       const ClutterActorBox  *box,
                       ClutterAllocationFlags  flags)
 {
-  ClutterGroupPrivate *priv = CLUTTER_GROUP (self)->priv;
   GList *children, *iter;
 
   /* chain up to set actor->allocation */
@@ -138,7 +137,6 @@ shell_stack_get_preferred_width (ClutterActor *actor,
 static void
 shell_stack_class_init (ShellStackClass *klass)
 {
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
   ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
 
   actor_class->get_preferred_width = shell_stack_get_preferred_width;
index d00de800b3410ed3d4ec03d6f3b6097f79831034..1ea6e1d7b50dc8b994b0da920a59598ef15629ec 100644 (file)
@@ -338,7 +338,7 @@ gnome_session_save_command (const char *arg)
   if (args[0] == NULL)
     return;
 
-  args[1] = arg;
+  args[1] = (char *)arg;
   args[2] = NULL;
 
   screen = gdk_screen_get_default ();
@@ -635,12 +635,6 @@ shell_status_menu_class_init (ShellStatusMenuClass *klass)
                   G_TYPE_NONE, 0);
 }
 
-ShellStatusMenu *
-shell_status_menu_new (void)
-{
-  return g_object_new (SHELL_TYPE_STATUS_MENU, NULL);
-}
-
 static void
 position_menu (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data)
 {
index b079a3b9c26f6cdbce7ebcd4b7d3d5b39eed6425..1b3a8d7f1ca083f1d5c7df5e42709d124b41be05 100644 (file)
@@ -151,13 +151,6 @@ shell_texture_cache_finalize (GObject *object)
   G_OBJECT_CLASS (shell_texture_cache_parent_class)->finalize (object);
 }
 
-ShellTextureCache*
-shell_texture_cache_new ()
-{
-  return SHELL_TEXTURE_CACHE (g_object_new (SHELL_TYPE_TEXTURE_CACHE,
-                                           NULL));
-}
-
 typedef struct {
   ShellTextureCache *cache;
   char *uri;
@@ -1030,7 +1023,7 @@ shell_texture_cache_load_recent_thumbnail (ShellTextureCache *cache,
  * created for a thumbnail.
  */
 void
-shell_texture_cache_unref_thumbnail (ShellTextureCache *cache,
+shell_texture_cache_evict_thumbnail (ShellTextureCache *cache,
                                      int                size,
                                      const char        *uri)
 {
@@ -1074,7 +1067,7 @@ static ShellTextureCache *instance = NULL;
  * Return value: (transfer none): The global texture cache
  */
 ShellTextureCache*
-shell_texture_cache_get_default ()
+shell_texture_cache_get_default (void)
 {
   if (instance == NULL)
     instance = g_object_new (SHELL_TYPE_TEXTURE_CACHE, NULL);
index 215e28a20484d1fa6cbaac8e1e51552be025e958..d24a681285504352d529924366d2628ac4f2911e 100644 (file)
@@ -38,7 +38,7 @@ typedef enum {
 
 GType shell_texture_cache_get_type (void) G_GNUC_CONST;
 
-ShellTextureCache* shell_texture_cache_get_default();
+ShellTextureCache* shell_texture_cache_get_default (void);
 
 ClutterActor *shell_texture_cache_load_gicon (ShellTextureCache *cache,
                                               GIcon             *icon,